#pragma once 

#include "..\Window.h"


namespace Zaf {
namespace Mwl {



class ControlWindow : public Window {

public:
	ControlWindow();
	ControlWindow(WORD id);
	virtual ~ControlWindow();

	bool IsVisible() const;
	void IsVisible(bool value);

	bool CanTabStop() const;
	void CanTabStop(bool value);

	bool HasBorder() const;
	void HasBorder(bool value);

	bool IsGroupHeader() const;
	void IsGroupHeader(bool value);

	void SetParent(Window& parent);

	WORD GetID() const;
	void SetID(WORD id);

protected:

private:
	void CommonConstructor();

	WORD m_id;
};


inline ControlWindow::ControlWindow() : m_id(0) {
	CommonConstructor();
}

inline ControlWindow::ControlWindow(WORD id) : m_id(id) {
	CommonConstructor();
}

inline ControlWindow::~ControlWindow() {

}


inline WORD ControlWindow::GetID() const {
	return m_id;
}


inline bool ControlWindow::IsVisible() const {
	return HasStyle(WS_VISIBLE);
}


inline void ControlWindow::IsVisible(bool value) {
	ShowWindow(GetHandle(), value == true ? SW_SHOW : SW_HIDE);
}


inline bool ControlWindow::CanTabStop() const {
	return HasStyle(WS_TABSTOP);
}


inline void ControlWindow::CanTabStop(bool value) {
	ChangeStyle(WS_TABSTOP, value);
}


inline bool ControlWindow::HasBorder() const {
	return HasStyle(WS_BORDER);
}


inline void ControlWindow::HasBorder(bool value) {
	ChangeStyle(WS_BORDER, value);
}


inline bool ControlWindow::IsGroupHeader() const {
	return HasStyle(WS_GROUP);
}

inline void ControlWindow::IsGroupHeader(bool value) {
	ChangeStyle(WS_GROUP, value);
}


}
}

